﻿using System.Linq;
using Xunit;

namespace Gamemaster.RollTests
{
    public class RollResultsTests
    {
        [Fact]
        public void KeepsResults()
        {
            RollResults dice = new RollResults(3);
            dice.Reroll(6);

            int expected = 3;
            int actual = dice.Results.Count;

            Assert.Equal(expected, actual);
        }

        [Fact]
        public void TotalsDiceCorrectly()
        {
            RollResults dice = new RollResults(3);

            int actual = dice.Reroll(6);
            int expected = dice.Results.Sum();

            Assert.Equal(expected, actual);
        }
    }
}
